home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 94 / maccd 94.iso / updates / Logitech / LCCInstallDiskWeb.sit / LCCInstallDiskWeb / Logitech Control Center.pkg / Contents / Resources / postflight < prev    next >
Encoding:
Text File  |  2002-06-17  |  1.5 KB  |  42 lines

  1. #!/bin/sh
  2. # $1 has the path to the source package
  3. # $2 has the path to the target folder
  4. # $3 has the path to the target volume
  5. # $USER has the name of the user who launched the installer
  6.  
  7.  
  8. # the extension is placed in /System/Library/Extensions folder
  9. EXTENSION="/System/Library/Extensions/LogitechUSBHIDevices.kext"
  10. # most other files in application support
  11. DAEMON="/Library/Application Support/Logitech/LCCDaemon.app"
  12. APPFLDR="/Library/Application Support/Logitech"
  13. # and pref pane in system wide preference panes folder
  14. PPANE="/Library/PreferencePanes/Logitech Control Center.prefPane"
  15.  
  16.  
  17. # set permissions for all installed components 
  18.  
  19. $3/usr/sbin/chown -R root:admin "$3/$EXTENSION"
  20. $3/bin/chmod -R 775 "$3/$EXTENSION"
  21.  
  22. $3/usr/sbin/chown -R root:admin "$3/$APPFLDR"
  23. $3/bin/chmod -R 775 "$3/$APPFLDR"
  24.  
  25. $3/usr/sbin/chown -R root:admin "$3/$PPANE"
  26. $3/bin/chmod -R 775 "$3/$PPANE"
  27.  
  28. # be sure that the system realizes that something changed, and rebuild extension cache
  29. $3/usr/bin/touch "$3/Library/PreferencePanes"
  30. $3/usr/bin/touch "$3/System/Library/Extensions"
  31.  
  32. kextload /System/Library/Extensions/LogitechUSBHIDevices.kext
  33. # Install the daemon in user's login items:
  34.  
  35. ThisUserId=`/usr/bin/id -u $USER`
  36. "$1/Contents/Resources/autolaunch" "$3/$DAEMON" $ThisUserId
  37.  
  38. #At that point there are good chances that plugging a device works correctly without restarting.
  39. #however, as we cannot guarantee that no one was plugged before (in this case the Apple KEXT has 
  40. #taken our device, or that the previous KEXT was unloaded, we prefer to ask for restart.
  41.  
  42. exit 0